package com.lmq.SegretionInterface;

public class example01 {
    public static void main(String[] args) {

    }
}

interface Interface1{
    void oper1();
    void oper2();
    void oper3();
    void oper4();
    void oper5();
}

class B implements Interface1{
    @Override
    public void oper1() {
        System.out.println("B 实现了opr1");
    }

    @Override
    public void oper2() {
        System.out.println("B 实现了opr2");

    }

    @Override
    public void oper3() {
        System.out.println("B 实现了opr3");

    }

    @Override
    public void oper4() {
        System.out.println("B 实现了opr4");

    }

    @Override
    public void oper5() {
        System.out.println("B 实现了opr5");

    }
}
class D implements Interface1{
    @Override
    public void oper1() {
        System.out.println("D 实现了opr1");
    }

    @Override
    public void oper2() {
        System.out.println("D 实现了opr2");

    }

    @Override
    public void oper3() {
        System.out.println("D 实现了opr3");

    }

    @Override
    public void oper4() {
        System.out.println("D 实现了opr4");

    }

    @Override
    public void oper5() {
        System.out.println("B 实现了opr5");

    }
}

class A {
    public void depend1(Interface1 i){
        i.oper1();
    }
    public void depend2(Interface1 i){
        i.oper2();
    }
    public void depend3(Interface1 i){
        i.oper3();
    }

}
class C {
    public void depend1(Interface1 i){
        i.oper1();
    }
    public void depend2(Interface1 i){
        i.oper4();
    }
    public void depend3(Interface1 i){
        i.oper5();
    }

}

